<?php
/*
  Document   : admin
  Created on : 12-mei-2011, 12:05:08
  Author     : Shahram abdi
  Description:
 */

// reference the file containing the connect class
require_once("homeLib.class.php");

// retrieve the operation to be performed
$mode = $_POST['mode'];

// create a new connectDB instance

$connenct = new Connenct();

// Clear the output
if (ob_get_length ())
    ob_clean();


if ($mode == 'RetrieveNew') {
    echo json_encode($connenct->retrieveNewNews());
}

if ($mode == 'RetrieveLogo') {
    echo json_encode($connenct->retrievelogo());
}

if ($mode == 'RetrieveStage') {
    echo json_encode($connenct->retrievestage());
}

if ($mode == 'RetrieveAllNew') {
    echo json_encode($connenct->retrieveAllNews());
}

if ($mode == 'RetrieveVacatures') {
    echo json_encode($connenct->retrieveVacatures());
}

if ($mode == 'RetrieveAllTopics') {
    echo json_encode($connenct->retrieveAllTopics());
}

?>
